<template>
  <div id="scan">
    <div class="well">诊前评估单快速录入</div>
    <p>
			本页面查询诊前评估单有两种方式：<br>
			1. 使用扫描枪扫描评估单二维码<br>
			2. 手动输入评估单确认码，并且按回车键<br>			
			</p>
		<div class="search">
			<el-input v-model="code" placeholder="请输入评估单确认码" @keyup.native.enter="onEnter"></el-input>
		</div>
  </div>
</template>

<script>
export default {
  name: 'wt-scan',
  data(){
  	return {
  		code:''
  	}
  },
  methods:{
  	onEnter(){
  		console.log(this.code)
		// const router = this.$router;
		// console.log(router)
  		this.$router.push({path: '/service-detail', 
		  query:{service_compose_id: this.code,user_id:LA.userInfo['info.id'].toString()}});
  	}
  }
}
</script>

<style lang="less">
#scan{
	.well{
	   	min-height: 20px;
	    padding: 19px;
	    margin-bottom: 20px;
	    background-color: #f5f5f5;
	    border: 1px solid #e3e3e3;
	    -webkit-border-radius: 4px;
	    -moz-border-radius: 4px;
	    border-radius: 4px;
	    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
	    -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
	    box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
	    h4{
		    margin: 10px 0;
		    font-family: 'Telex',sans-serif;
		    font-weight: bold;
		    line-height: 20px;
		    color: #317eac;
		    text-rendering: optimizelegibility;
		}
	}
	.search{
		width:100%;
		max-width:60rem;
	}
}


</style>